package com.sz.biz.trade.ord.entity;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Function: 订单状态 <br>
 * Author: jifeixing<br>
 * Date: 2017-05-18 17:03:00
 */
public enum TrdOrderStatus implements IEnum {

    DRAFT("1", "草稿"),
    CONFIRMING("2", "待确认"),
    DELIVERY("3", "待发货"),
    TRANSPORT("4", "待收货"),
    SIGNED("5", "已签收");

    private String code;
    private String name;

    TrdOrderStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static TrdOrderStatus valueOfEnum(String code) {
        TrdOrderStatus[] iss = values();
        for (TrdOrderStatus cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
